home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2005 October / PCWOCT05.iso / Software / FromTheMag / XAMPP 1.4.14 / xampp-win32-1.4.14-installer.exe / xampp / php / pear / DB / NestedSet / Event.php < prev    next >
PHP Script  |  2004-03-24  |  2KB  |  80 lines

  1. <?php
  2. /**
  3. // +----------------------------------------------------------------------+
  4. // | PEAR :: DB_NestedSet_DB                                                   |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2003 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.0 of the PHP license,       |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Authors: Daniel Khan <dk@webcluster.at>                              |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: Event.php,v 1.1.1.1 2003/04/09 22:28:14 datenpunk Exp $
  20. //
  21. //
  22. */
  23.  
  24. /**
  25. * Poor mans event handler for DB_NestedSet
  26. * Mostly for demo purposes or for extending it if
  27. * someone has ideas...
  28. *
  29. * @author       Daniel Khan <dk@webcluster.at>
  30. * @package      DB_NestedSet
  31. * @version      $Revision: 1.1.1.1 $
  32. * @access       public
  33. */
  34. Class DB_NestedSetEvent extends PEAR {
  35.  
  36.     /**
  37.     * Constructor
  38.     *
  39.     * @return void
  40.     */        
  41.     function DB_NestedSetEvent() {
  42.  
  43.         $this->PEAR();
  44.     }
  45.     
  46.     /**
  47.     * Destructor
  48.     *
  49.     * @return void
  50.     */        
  51.     function _DB_NestedSetEvent() {
  52.         
  53.         $this->_PEAR();    
  54.     }
  55.     
  56.  
  57.     /**
  58.     * Calls the event handler
  59.     *
  60.     * You may want to do a switch() here and call you methods
  61.     * depending on the event
  62.     *
  63.     * @param    string $event    The Event that occured
  64.     * @param    object node $node A Reference to the node object which was subject to changes
  65.     * @param    array $eparams    A associative array of params which may be needed by the handler
  66.     * @return void
  67.     * @access private
  68.     */        
  69.     function callEvent($event, &$node, $eparams = array()) {
  70.  
  71.         echo "<br>Override callEvent() if you want to have custom event handlers<br>\n";
  72.         echo "Event $event was called with the following params:<br><br>\n";
  73.         echo "<PRE>";
  74.         print_r($eparams);
  75.         echo "</PRE><br>\n";    
  76.     }
  77. }
  78. ?>
  79.